{{if empty($_GET['inajax'])}}
		<div class="ui-portlet">
			{{template wxes/_user_wxes}}
			<ol class="breadcrumb">
			  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;{{__('Personal Center')}}</a></li>
			  <li class="active">图文素材列表</li>
			</ol>
		</div>        
       
       <div class=" ui-portlet" id="sync-wxmsg-list">
       
{{/if}}
       		<style>
.sync-article-msg{line-height:30px;font-size:16px;}
.sync-article-msg .appmsg_content{border:1px solid #ccc;padding:2px 10px;height:70px;text-align:left;}
</style>
	<div class="alert alert-info" style="text-align:left;">
		<button aria-label="Close" data-dismiss="alert" class="close" type="button"><span aria-hidden="true">×</span></button>
		<p style="clear: none;color:red;"><strong>同步要求：</strong> 同步文章需要设置封面图片 </p>
		<p><strong>操作方式：</strong>1. 将左边的图文拖动到右侧区域；2. 上下调整顺序；3.提交到微信</p>
	</div>
	<div class="clearfix text-left">
	{{if count($user_wx_lists) > 1 }}
		
			<label for="WxMsgCateId">同步公众号：</label>
			{{$this->Form->input('wx_id',array('id'=>'sync-wxid-select','options'=>$user_wx_lists,'style'=>'width:auto;','value'=> $current_wxinfo['Wx']['id'], 'div'=>false,'label'=>false))}}
	{{elseif count($user_wx_lists) == 1 }}
				同步到公众号： {{$current_wxinfo['Wx']['name']}}
	{{/if}}
	
			<span style="margin-left:20px;">所属分类： {{$this->Form->input('cate_id',array('id'=>'wxmsg-sync-cateid','options'=>$cates,'style'=>'width:auto;','value'=> $_REQUEST['cate_id'] , 'div'=>false,'label'=>false))}}</span>
	</div>
	
				<div class="text-center">{{$page_navi}}</div>
				<div  class="clearfix">
		       		<div style="height:320px;float:left;overflow-y:auto;width:400px;margin-right:10px;border:1px dotted #aaa;">
		       			<ol class="sync-article-list"  style="min-height:280px;">
				       {{loop $datalist $item}}
				       		<li class="sync-article-msg clearfix" id="article-msg-{{$item['WxMsg']['id']}}"  data-id="{{$item['WxMsg']['id']}}">
					       		<div class="appmsg_content">
						       		{{if $item['WxMsg']['coverimg']}}
						       			{{$this->Html->image($item['WxMsg']['coverimg'],array('style'=>'height:60px;width:60px;','class'=>'cover pull-right'))}}
						       		{{/if}}
						       		<p class="title" style="clear: none;">{{$item['WxMsg']['name']}}</p>
						       		<p class="appmsg_desc hidden summary" style="clear:none;">{{usubstr($item['WxMsg']['summary'],0,32)}}</p>
					       		</div>
					       		<div class="clearfix">
					       			<a href="javascript:void(0)" class="col-xs-4 select-msg" class="glyphicon glyphicon-arrow-left"></i></a>
					       			<a href="{{$this->Html->url('/wx_msgs/view/'.$item['WxMsg']['id'])}}?width=400" data-toggle="tooltip" data-container="body" title="点击预览" target="_blank"></a>
					       		</div>
				       		</li>		       	
				  		{{/loop}}
			  			</ol>
			  		</div>
			  		<div style="width: 30px;display: inline;float: left;text-align: center;" title="将左边的图文拖动到右侧区域，可上下调整顺序"><i class="fa fa-arrow-right"></i><br><i class="fa fa-arrow-right"></i><br><i class="fa fa-arrow-right"></i><br><i class="fa fa-arrow-right"></i><br><i class="fa fa-arrow-right"></i><br></div>
			  		<div style="float:right;height:320px;width:400px;overflow-y:auto;border:1px solid #aaa;margin-left:10px;">
			  			<ol id="sync-selected" class="sync-article-list" style="min-height:280px;padding-bottom: 80px;">
			  				
			  			</ol>
			  		</div>
		  		</div>
	    	<div class="text-center">
	    		{{if empty($current_wxinfo)}}
	    			<a target="_blank" href="http://www.135plat.com/wxes/pauth">授权公众号</a>后才能同步文章到微信</a>
	    		{{else}}
	    			<button id="btn-sync-wechat" class="btn btn-warning btn-block" style="margin-top:10px;">保存到微信</button>
	    			<p> 同步耗时与文章中图片多少有关，系统会上传所有图片至微信，可能发生超时。</p>
	    			<p>若同步超时失败或同步后缺图片（个别图片调用微信上传接口失败）可尝试重新同步（重试时图片上传微信为续传模式）。</p>
	    		{{/if}}
	    	</div>
{{if empty($_GET['inajax'])}}
    	</div>
{{/if}}